<!DOCTYPE html>
<html lang="en">
<head>
    <title>问题列表</title>
    <titleType style="display: none;">index</titleType>
    <%- include('../../_global/baseLibs') %>
    <link href="/quickJs/scripts/easyui/1.5.1/themes/bootstrap/easyui.css" rel="stylesheet"/>
    <link href="quickJs/scripts/easyui/1.5.1/themes/icon.css"/>
    <link href="/quickJs/scripts/jquery/plug-ins/layer/layer_mobile/need/layer.css" rel="stylesheet" /> 
    <link href="/quickJs/scripts/easyui/1.5.1/themes/bootstrap/easyui.css" rel="stylesheet"/>
    <!-- <link href="/quickJs/scripts/layui/css/layui.css" rel="stylesheet"/> -->
    <script src="/quickJs/scripts/easyui/1.5.1/jquery.easyui.min.js"></script>
    <script src="/quickJs/scripts/jquery/plug-ins/layer/layer_mobile/layer.js" class='layer'></script>
    <script src="/quickJs/scripts/layui/layui.js"></script>
    <style>
    
        .page-user .default-list > li .item-inner {
         margin-left: 0; 

       }
       .page-user .text-box .doc-base  .title{
         color: #666;
         
      }
      .page-user .text-box .doc-base  .flag{
         color: #666;
         float: right;
         
      }
      .page-user .tips-text {
        height: 2.5rem;
        line-height: 2.5rem;      
      }
      .page-user .text-box {
        position: absolute;
        left: 1rem;
      }
      .questionContent{
       word-break:break-all;
       margin-left:1rem;
       font-size: 1.2rem;
    }
    .page-wrap{
     background-color:transparent;
   }
.plane-box{

  background-color:transparent;
}
   .default-list li{
    background-color: #fff;
    margin-bottom: 0.6rem;
   }
   .questionTime{
    margin-left: 1rem;
    padding: 0.6rem 0;
   }
    </style>
    <script src="/static/js/crypto-js.js"></script>
    <script src="/static/lib/touchslider.js"></script>
    <script>
     
        var page_consult = (function($, page_consult) {
            var key = "jkcs";
            $.JkcsUserInfo.getUserInfoGzd({
                callback: function(userInfo){
                    page_consult.userInfo = userInfo;
                }
            });
            page_consult.init = function(cfg){
            //设置默认加载页
            $("#nextPage").val("1");
            /**流加载*/
             layui.use('flow', function () {
                    var flow = layui.flow;
                    flow.load({
                        elem: '#questList' //指定列表容器
                        , isAuto:true
                        , done: function (page, next) { //到达临界点（默认滚动触发），触发下一页
                         
                            var params = {
                                page:$("#nextPage").val(),
                            };
                            var lis=[];
                            var queryDataBack_prame={page:page,next:next};
                            $.QuickRemote.AjaxJson({
                                funcName:"/api/gzd/question/questions"
                                ,callback:function(result){
                                  lis = [];
                                  $(result.content).each(function(index, item){
                                      var quesLi = $($("#quesLi").html());
                                      $(quesLi).find(".questionContent").text("提问："+item["content"]);
                                      $(quesLi).find(".questionTime").text("提问时间："+item["postTime"]);
                                      $(quesLi).attr("data",item["questionId"]);
                                      lis.push(quesLi);
                                         
                                  });
                                   $("#questList").append(lis);
                                   $("#questList").find("li").on("click",onlineConsultAsk);
                                   $("#nextPage").val(result.page);
                                   next("", result.more);
                                   $(".layui-flow-more").remove();
                                  /* var flag = "加载更多";
                                   if(!result.more){
                                      flag = "没有更多了";
                                   }
                                   $(".layui-flow-more").remove();
                                   var div = "<div class=\"layui-flow-more\"><a href=\"javascript:;\"><cite>"+flag+"</cite></a></div>";

                                   $("#questList").append(div);*/
                                   
                                }
                                ,params:params
                               
                            });
                        }
                    });
                });

            
              
        }
            function onlineConsultAsk() {
                var data = $(this).attr("data");
                $.pageSwitch.goToUrl("onlineConsult","questDetailList","questionId="+data);
            }        

            return page_consult;
        })(jQuery, {});
    </script>
</head>
<body>
<section class="page-wrap page-user">
    <!--内容-->
    <input type="hidden" id="nextPage" value = "1"/>
    
    <div class="plane-box first">
       
        <ul class="default-list" id="questList">
           <!--  <li>
              <div class="item-inner big-box">
                            
                  <div class="questionContent"></div>
                  
              </div>
              <div class="questionTime"></div>
            </li>
             <li>
              <div class="item-inner big-box">
                            
                  <div class="questionContent">提问：血糖控制总是反复怎么办3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333</div>
                     <p>2011-02-03 </p>
              </div>
            </li> -->
            
        </ul>
    </div>
    <!--内容END-->
</section>
<script type="text/html" id="quesLi">
 <li>
              <div class="item-inner big-box">
                            
                  <div class="questionContent"></div>
                  
              </div>
              <div class="questionTime"></div>
            </li>
</script>
</body>
</html>
